from rest_framework.pagination import PageNumberPagination

class StandardResultsSetPagination(PageNumberPagination):
    page_size = 2
    page_size_query_param = 'page_size'
    max_page_size = 20


class MyResultSetPagination(PageNumberPagination):
    # 设置默认每页返回多少条记录
    page_size = 2
    # 可以修改默认的分页属性名
    page_query_param = 'page_size'
    # 每页最多显示的数量
    max_page_size = 20